cicnButton is a CDEF (control definition) that allows you to use cicn color icons as buttons instead of the drab black and white buttons that you are used to. You can use it just about anywhere. I've tested it on various machines. I've included a sample application that shows the CDEF in action.
VERSION HISTORY
1.0.0 - initial release
INSTRUCTIONS
To use the CDEF, copy the CDEF resource into your project's resource file.
Then, create CNTLs with the following settings:
The BoundsRect should correspond to where you want the cicn to be displayed in your dialog.
Value should be the resource ID of the cicn you want as the default for the button. For example, you might use cicn ID 1000. In this case, the following table tells you what cicns you need and what they are used for:
1000 - default cicn
1001 - inverted cicn (when you click and hold on the control)
Visible should be set to true.
Max and Min should be set to zero, since they don't mean anything to cicnButton.
ProcID should be set to (CDEF ID * 16) + Variation. I've set the CDEF ID to 38, so in most cases, the ProcID should be set to 608.
RefCon should be set to zero.
Title can contain an optional title, if you want it displayed below the cicn.
If you do not have a cicn of a certain ID and the CDEF is looking for it, things will probably not work correctly. If cicnButton does not work on your setup, I would certainly like to hear about it.
You may use cicnButton CDEF in any public domain, freeware, shareware, or commercial product. I would appreciate a copy of any product in which it is used. Credit would also be nice, though I don't require it.
Source code is available. Please email me for details. Bugs, gripes, comments, etc. should be sent to me (Paul Celestin) at one of the following addresses: